using UnityEngine;

namespace GameCore
{
    public class SortingLayerChanger : MonoBehaviour
    {
        public string layerName;
        private void OnValidate()
        {
            GetComponent<Renderer>().sortingLayerName = layerName;
        }

        private void Awake()
        {
            Destroy(this);
        }
    }
}